package com.momo.hotel.service.impl;

import com.momo.hotel.dao.mapping.TbHotelBrankMapper;
import com.momo.hotel.dao.mapping.ext.TbRoomListMapperExt;
import com.momo.hotel.dao.pojo.TbHotelBrank;
import com.momo.hotel.dao.pojo.ext.TbRoomList;
import com.momo.hotel.service.HotelService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class HotelServiceImpl implements HotelService {

    @Resource
    TbHotelBrankMapper tbHotelBrankMapper;
    @Resource
    TbRoomListMapperExt tbRoomListMapperExt;

    @Override
    public List<TbHotelBrank> selectHotels() {
        System.out.println(tbHotelBrankMapper.selectAll());
        return tbHotelBrankMapper.selectAll();
    }

    @Override
    public List<TbRoomList> roomList(int id) {
        return tbRoomListMapperExt.selectTbRoomList(id);
    }
}
